//
//  FeedListTagsTableViewCell.m
//  TestApplication
//
//  Created by Hanlingyu on 16/9/3.
//  Copyright © 2016年 ltq. All rights reserved.
//

#import "FeedListTagsTableViewCell.h"
#import "NewActionChannel.h"
#import "NewActionContent.h"
#import "NewActionTagModel.h"
@interface FeedListTagsTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *tagsLabel;


@end


@implementation FeedListTagsTableViewCell

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    self = [super initWithCoder:aDecoder];
    if (self) {
        
        self.contentView.backgroundColor = [UIColor colorWithWhite:0.917 alpha:1.000];
        
    }
    return self;
}

- (void)setActionContent:(NewActionContent *)actionContent {
    _actionContent = actionContent;
    NSMutableArray *tagNameArray = [NSMutableArray array];
    for (NSInteger i = 0; i < _actionContent.tag.count; i++) {
        [tagNameArray addObject:_actionContent.tag[i].content];
    }
    if (tagNameArray.count != 0) {
        [tagNameArray insertObject:@"#" atIndex:0];
    }
    NSString *tagString = [tagNameArray componentsJoinedByString:@" "];
//    NSLog(@"%@", tagString);
    _tagsLabel.text = tagString;
}


- (void)layoutSubviews {
    [super layoutSubviews];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
